Part Number Hot Search : 
MC68185 74HC7 TLMH3102 SMBJ36A VHC1G0 2SC52 BC848 NF25T
Product Description
Full Text Search
 

To Download VRS51C550 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  ramtron international corporation ? http://www.ramtron.com 1850 ramtron drive colorado springs ? mcu customer service: 1 - 800 - 943 - 4625, 1 - 514 - 871 - 2447, ext. 20 8 colorado , usa, 8092 1 ? 1 - 800 - 545 - fram, 1 - 719 - 481 - 7000 page 1 of 40 vrs51x5 5 0 /560 datasheet rev 1. 3 versa 8051 mcu s with 8/16kb flash overview the vrs51x550 and vrs51x560 are low - cost 8 - bit microcontrollers based on the standard 80c51 microcontroller architecture. they are p in compatible drop - in replacements for the 8051 ideal for a wide range of applications requiring low to midrange amounts of program/data memory , coupled with streamlined peripheral support, the vrs51x550 /56 0 devices feature 8 k b /1 6 k b , of flash memory (respectively) , 256 byt es of ram , a uart, three 16 - bit timers, a watchdog timer and power saving modes . the vrs51x550 is available in 3.3 (vrs51l550) or 5 volt version s (VRS51C550) , while the vrs51x560 is available in a 5 volt version (vrs51c560). all devices come in plcc - 44, qf p - 44 and dip - 40 packages and operate in the i ndustrial temperature range. flash can be programmed using a parallel programmer available from ramtron or with a third party commercial programmer. f igure 1: vrs51 x 550 / vrs51 x 560 f unc tional d iagram port 0 8051 processor port 3 port 2 port 1 8 kb / 16 kb flash 2 interrupt inputs uart 256 b ytes of ram reset timer 0 timer 2 timer 1 power control watchdog timer address / data bus 8 8 8 8 feature set 80c51/80c52 pin compatible 12 clock periods per machine cycle 8 kb / 16 k b on - chip flash memory 256 bytes on - chip data ram 32 i/o lines on four 8 - bit ports full duplex serial port (uart) 3, 16 - bit timers/counters watch d og timer 8 - bit unsigned division / multiply bcd arithmetic direct and indirect addressing two levels of interrupt priority and nested interrupts power saving modes code protection function operates at a clock frequency of up to 40mh z low emi (inhibit ale) programming voltage: 12v industrial temperature range ( - 40c to +85c) 5v and 3v versions available (see ordering information) f igure 2: vrs51 x 550 / vrs51 x 560 plcc and qfp p inout d iagrams p 1 . 6 p 1 . 5 reset p 1 . 7 nc rxd / p 3 . 0 # int 0 / p 3 . 2 txd / p 3 . 1 t 0 / p 3 . 4 # int 1 / p 3 . 3 t 1 / p 3 . 5 # r d / p 3 . 7 # w r / p 3 . 6 x t a l 1 x t a l 2 n c v s s p 2 . 1 / a 9 p 2 . 0 / a 8 p 2 . 3 / a 1 1 p 2 . 2 / a 1 0 p 2 . 4 / a 1 2 p 2 . 6 / a 14 p 2 . 5 / a 13 # psen p 2 . 7 / a 15 nc ale p 0 . 7 / ad 7 # ea p 0 . 5 / ad 5 p 0 . 6 / ad 6 p 0 . 4 / ad 4 p 1 . 3 p 1 . 4 t 2 e x / p 1 . 1 p 1 . 2 n c t 2 / p 1 . 0 p 0 . 0 / a d 0 v d d p 0 . 2 / a d 2 p 0 . 1 / a d 1 p 0 . 3 / a d 3 1 vrs 51 x 550 / 560 plcc - 44 6 7 17 18 28 29 39 40 1 44 11 12 22 23 33 34 vrs 51 x 550 / 560 qfp - 44 p 2 . 6 / a 1 4 p 2 . 5 / a 1 3 # p s e n p 2 . 7 / a 1 5 n c a l e p 0 . 7 / a d 7 # e a p 0 . 5 / a d 5 p 0 . 6 / a d 6 p 0 . 4 / a d 4 # rd / p 3 . 7 # wr / p 3 . 6 xtal 1 xtal 2 nc vss p 2 . 1 / a 9 p 2 . 0 / a 8 p 2 . 3 / a 11 p 2 . 2 / a 10 p 2 . 4 / a 12 p 1 . 6 p 1 . 5 r e s e t p 1 . 7 n c r x d / p 3 . 0 # i n t 0 / p 3 . 2 t x d / p 3 . 1 t 0 / p 3 . 4 # i n t 1 / p 3 . 3 t 1 / p 3 . 5 p 1 . 3 p 1 . 4 t 2 ex / p 1 . 1 p 1 . 2 nc t 2 / p 1 . 0 p 0 . 0 / ad 0 vdd p 0 . 2 / ad 2 p 0 . 1 / ad 1 p 0 . 3 / ad 3
vrs51x5 5 0 /560 ___________ _____________________________________________________________________________________ www.ramtron.com page 2 of 40 pin descriptions for qfp - 44 t able 1: p in d escriptions for qfp - 44/ qfp - 44 name i/o function 1 p1.5 i/o bit 5 of port 1 2 p1.6 i/o bit 6 of port 1 3 p1.7 i/o bit 7 of port 1 4 res i reset rxd i receive data 5 p3.0 i/o bit 0 of port 3 6 nc - no connect txd o transmit data & 7 p3.1 i/o bit 1 of port 3 #int0 i external interrupt 0 8 p3.2 i/o bit 2 of port 3 #int1 i external interrupt 1 9 p3.3 i/o bit 3 of port 3 t0 i timer 0 10 p3.4 i/o bit 4 of port 3 t1 i timer 1 & 3 11 p3.5 i/o bit 5 of port #wr o ext. memory write 12 p3.6 i/o bit 6 of port 3 #rd o ext. memory read 13 p3.7 i/o bit 7 of port 3 14 xtal2 o oscillator/crystal output 15 xtal1 i oscillator/crystal in 16 vss - ground 17 nc - no connect p2.0 i/o bit 0 of port 2 18 a8 o bit 8 of external memory address p2.1 i/o bit 1 of port 2 19 a9 o bit 9 of external memory address p2.2 i/o bit 2 of port 2 20 a10 o bit 10 of external memory address p2.3 i/o bit 3 of port 2 & 21 a11 o bit 11 of external memory address p2.4 i/o bit 4 of port 2 22 a12 o bit 12 of external memory address p2.5 i/o bit 5 of port 2 23 a13 o bit 13 of external memory address qfp - 44 name i/o function p2.6 i /o bit 6 of port 2 24 a14 o bit 14 of external memory address p2.7 i/o bit 7 of port 2 25 a15 o bit 15 of external memory address 26 #psen o program store enable 27 ale o address latch enable 28 nc - no connect 29 #ea i external access p0.7 i/o bit 7 of port 0 30 ad7 i/o data/address bit 7 of external memory p0.6 i/o bit 6 of port 0 31 ad6 i/o data/address bit 6 of external memory p0.5 i/o bit 5 of port 0 32 ad5 i/o data/address bit 5 of external memory p0.4 i/o bit 4 of port 0 33 ad4 i/o data/address bit 4 of external memory p0.3 i/o bit 3 of port 0 34 ad3 i/o data/address bit 3 of external memory p0.2 i/o bit 2 of port 0 35 ad2 i/o data/address bit 2 of external memory p0. 1 i/o bit 1 of port 0 & data 36 ad1 i/o address bi t 1 of external memory p0.0 i/o bit 0 of port 0 & data 37 ad0 i/o address bit 0 of external memory 38 vdd - vcc 39 nc - no connect t2 i timer 2 clock out 40 p1.0 i/o bit 0 of port 1 t2ex i timer 2 control 41 p1.1 i/o bit 1 of port 1 42 p1.2 i /o bit 2 of port 1 43 p1.3 i/o bit 3 of port 1 44 p1.4 i/o bit 4 of port 1 1 44 11 12 22 23 33 34 vrs 51 x 550 / 560 qfp - 44 p 2 . 6 / a 1 4 p 2 . 5 / a 1 3 # p s e n p 2 . 7 / a 1 5 n c a l e p 0 . 7 / a d 7 # e a p 0 . 5 / a d 5 p 0 . 6 / a d 6 p 0 . 4 / a d 4 # rd / p 3 . 7 # wr / p 3 . 6 xtal 1 xtal 2 nc vss p 2 . 1 / a 9 p 2 . 0 / a 8 p 2 . 3 / a 11 p 2 . 2 / a 10 p 2 . 4 / a 12 p 1 . 6 p 1 . 5 r e s e t p 1 . 7 n c r x d / p 3 . 0 # i n t 0 / p 3 . 2 t x d / p 3 . 1 t 0 / p 3 . 4 # i n t 1 / p 3 . 3 t 1 / p 3 . 5 p 1 . 3 p 1 . 4 t 2 ex / p 1 . 1 p 1 . 2 nc t 2 / p 1 . 0 p 0 . 0 / ad 0 vdd p 0 . 2 / ad 2 p 0 . 1 / ad 1 p 0 . 3 / ad 3 35 36 37 38 39 40 41 42 43 21 20 19 18 17 16 15 14 13 32 31 30 29 28 27 26 25 24 2 3 4 5 6 7 8 9 10
vrs51x5 5 0 /560 ___________ _____________________________________________________________________________________ www.ramtron.com page 3 of 40 pin descriptions for plcc - 44 t able 2: p in d escriptions for plcc - 44 plcc - 44 name i/o function 1 nc - no connect t 2 i timer 2 clock out 2 p1.0 i/o bit 0 of port 1 t2ex i timer 2 control 3 p1.1 i/o bit 1 of port 1 4 p1.2 i/o bit 2 of port 1 5 p1.3 i/o bit 3 of port 1 6 p1.4 i/o bit 4 of port 1 7 p1.5 i/o bit 5 of port 1 8 p1.6 i/o bit 6 of port 1 9 p1.7 i/o bit 7 of port 1 10 res i reset rxd i receive data 11 p3.0 i/o bit 0 of port 3 12 nc - no connect txd o transmit data & 13 p3.1 i/o bit 1 of port 3 #int0 i external interrupt 0 14 p3.2 i/o bit 2 of port 3 #int1 i external interrupt 1 15 p3.3 i/o bit 3 of port 3 t0 i timer 0 16 p3.4 i/o bit 4 of port 3 t1 i timer 1 & 3 17 p3.5 i/o bit 5 of port #wr o ext. memory write 18 p3.6 i/o bit 6 of port 3 #rd o ext. memory read 19 p3.7 i/o bit 7 of port 3 20 xtal2 o oscillator/crystal out put 21 xtal1 i oscillator/crystal in 22 vss - ground 23 nc - no connect p 1 . 6 p 1 . 5 reset p 1 . 7 nc rxd / p 3 . 0 # int 0 / p 3 . 2 txd / p 3 . 1 t 0 / p 3 . 4 # int 1 / p 3 . 3 t 1 / p 3 . 5 # r d / p 3 . 7 # w r / p 3 . 6 x t a l 1 x t a l 2 n c v s s p 2 . 1 / a 9 p 2 . 0 / a 8 p 2 . 3 / a 1 1 p 2 . 2 / a 1 0 p 2 . 4 / a 1 2 p 2 . 6 / a 14 p 2 . 5 / a 13 # psen p 2 . 7 / a 15 nc ale p 0 . 7 / ad 7 # ea p 0 . 5 / ad 5 p 0 . 6 / ad 6 p 0 . 4 / ad 4 p 1 . 3 p 1 . 4 t 2 e x / p 1 . 1 p 1 . 2 n c t 2 / p 1 . 0 p 0 . 0 / a d 0 v d d p 0 . 2 / a d 2 p 0 . 1 / a d 1 p 0 . 3 / a d 3 1 vrs 51 x 550 / 560 plcc - 44 6 7 17 18 28 29 39 40 5 4 3 2 44 43 42 41 23 19 20 21 22 27 24 25 26 8 9 10 11 12 13 14 15 16 38 37 36 35 34 33 32 31 30 plcc - 44 name i/o function p2.0 i/o bit 0 of port 2 24 a8 o bit 8 of external memory address p2.1 i/o bit 1 of port 2 25 a9 o bit 9 of ex ternal memory address p2.2 i/o bit 2 of port 2 26 a10 o bit 10 of external memory address p2.3 i/o bit 3 of port 2 & 27 a11 o bit 11 of external memory address p2.4 i/o bit 4 of port 2 28 a12 o bit 12 of external memory address p2.5 i/o bit 5 of port 2 29 a13 o bit 13 of external memory address p2.6 i/o bit 6 of port 2 30 a14 o bit 14 of external memory address p2.7 i/o bit 7 of port 2 31 a15 o bit 15 of external memory address 32 #psen o program store enable 33 ale o address latch e nable 34 nc - no connect 35 #ea i external access p0.7 i/o bit 7 of port 0 36 ad7 i/o data/address bit 7 of external memory p0.6 i/o bit 6 of port 0 37 ad6 i/o data/address bit 6 of external memory p0.5 i/o bit 5 of port 0 38 ad5 i/o data/add ress bit 5 of external memory p0.4 i/o bit 4 of port 0 39 ad4 i/o data/address bit 4 of external memory p0.3 i/o bit 3 of port 0 40 ad3 i/o data/address bit 3 of external memory p0.2 i/o bit 2 of port 0 41 ad2 i/o data/address bit 2 of external memory p0. 1 i/o bit 1 of port 0 & data 42 ad1 i/o address bit 1 of external memory p0.0 i/o bit 0 of port 0 & data 43 ad0 i/o address bit 0 of external memory 44 vdd - vcc
vrs51x5 5 0 /560 ________________________________________________________________________________________________ www.ramtron.com page 4 of 40 pin descriptions for dip - 40 t able 3: p in d escriptions for dip - 40 dip40 name i/o function t2 i timer 2 clock out 1 p1.0 i/o bit 0 of port 1 t2ex i timer 2 control 2 p1.1 i/o bit 1 of port 1 3 p1.2 i/o bit 2 of port 1 4 p1.3 i/o bit 3 of port 1 5 p1.4 i/o bit 4 of port 1 6 p1.5 i/o bit 5 of port 1 7 p1.6 i/o bit 6 of port 1 8 p1.7 i/o bit 7 of port 1 9 reset i reset rxd i receive data 10 p3.0 i/o bit 0 of port 3 txd o transmit data & 11 p3.1 i/o bit 1 of port 3 #int0 i external interrupt 0 12 p3.2 i/o bit 2 of port 3 #int1 i external interrupt 1 13 p3.3 i/o bit 3 of port 3 t0 i timer 0 14 p3.4 i/o bit 4 of port 3 t1 i timer 1 & 3 15 p3.5 i/o bit 5 of port #wr o ext. memory write 16 p3.6 i/o bit 6 of port 3 #rd o ext. memory read 17 p3.7 i/o bit 7 of por t 3 18 xtal2 o oscillator/crystal output 19 xtal1 i oscillator/crystal in 20 vss - ground t 2 / p 1 . 0 t 2 ex / p 1 . 1 p 1 . 2 p 1 . 3 p 1 . 4 p 1 . 5 p 1 . 6 p 1 . 7 reset rxd / p 3 . 0 txd / p 3 . 1 # int 0 / p 3 . 2 # int 1 / p 3 . 3 t 0 / p 3 . 4 t 1 / p 3 . 5 # wr / p 3 . 6 # rd / p 3 . 7 xtal 2 xtal 1 vss vrs 51 x 550 vrs 51 x 560 dip - 40 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 vdd p 0 . 0 / ad 0 p 0 . 1 / ad 1 p 0 . 2 / ad 2 p 0 . 3 / ad 3 p 0 . 4 / ad 4 p 0 . 5 / ad 5 p 0 . 6 / ad 6 p 0 . 7 / ad 7 # ea / vpp ale psen p 2 . 7 / a 15 p 2 . 6 / a 14 p 2 . 5 / a 13 p 2 . 4 / a 12 p 2 . 3 / a 11 p 2 . 2 / a 10 p 2 . 1 / a 9 p 2 . 0 / a 8 dip40 name i/o function p2.0 i/o bit 0 of port 2 21 a8 o bit 8 of external memory address p2.1 i/o bit 1 of port 2 22 a9 o bit 9 of external memory address p2.2 i/o bit 2 of port 2 23 a10 o bit 10 of external memory address p2.3 i/o bit 3 of port 2 & 24 a11 o bit 11 of external memory address p2.4 i/o bit 4 of port 2 25 a12 o bit 12 of external memory address p2.5 i/o bit 5 of port 2 26 a13 o bit 13 of external memory address p2.6 i/o bit 6 of port 2 27 a14 o bit 14 of external memory address p2.7 i/o bit 7 of port 2 28 a15 o bit 15 of external memory address 29 #psen o program store enable 30 ale o add ress latch enable 31 #ea / vpp i external access flash programming voltage input p0.7 i/o bit 7 of port 0 32 ad7 i/o data/address bit 7 of external memory p0.6 i/o bit 6 of port 0 33 ad6 i/o data/address bit 6 of external memory p0.5 i/o bit 5 of port 0 34 ad5 i/o data/address bit 5 of external memory p0.4 i/o bit 4 of port 0 35 ad4 i/o data/address bit 4 of external memory p0.3 i/o bit 3 of port 0 36 ad3 i/o data/address bit 3 of external memory p0.2 i/o bit 2 of port 0 37 ad2 i/o data/address bit 2 of external memory p0. 1 i/o bit 1 of port 0 & data 38 ad1 i/o address bit 1 of external memory p0.0 i/o bit 0 of port 0 & data 39 ad0 i/o address bit 0 of external memory 40 vdd - supply input
vrs51x5 5 0 /560 ________________________________________________________________________________________________ www.ramtron.com page 5 of 40 instruction set the followi ng tables describe the instruction set of the vrs51x550 / 560 . the instructions are function and binary code compatible with industry standard 8051s. t able 4: l egend for i nstruction s et t able symbol function a accumulator rn register r 0 - r7 direct internal register address @ri internal register pointed to by r0 or r1 (except movx) rel two's complement offset byte bit direct bit address #data 8 - bit constant #data 16 16 - bit constant addr 16 16 - bit destination address addr 11 11 - bit destination address t able 5: vrs51 x 550 / vrs51 x 560 i nstruction s et mnemonic description size (bytes) instr. cycles arithmetic instructions add a, rn add register to a 1 1 add a, direct add direct byte to a 2 1 add a, @ri add data m emory to a 1 1 add a, #data add immediate to a 2 1 addc a, rn add register to a with carry 1 1 addc a, direct add direct byte to a with carry 2 1 addc a, @ri add data memory to a with carry 1 1 addc a, #data add immediate to a with carry 2 1 subb a, rn subtract register from a with borrow 1 1 subb a, direct subtract direct byte from a with borrow 2 1 subb a, @ri subtract data mem from a with borrow 1 1 subb a, #data subtract immediate from a with borrow 2 1 inc a increment a 1 1 inc rn increment register 1 1 inc direct increment direct byte 2 1 inc @ri increment data memory 1 1 dec a decrement a 1 1 dec rn decrement register 1 1 dec direct decrement direct byte 2 1 dec @ri decrement data memory 1 1 inc dptr increment data pointer 1 2 mul a b multiply a by b 1 4 div ab divide a by b 1 4 da a decimal adjust a 1 1 logical instructions anl a, rn and register to a 1 1 anl a, direct and direct byte to a 2 1 anl a, @ri and data memory to a 1 1 anl a, #data and immediate to a 2 1 anl direct, a and a to direct byte 2 1 anl direct, #data and immediate data to direct byte 3 2 orl a, rn or register to a 1 1 orl a, direct or direct byte to a 2 1 orl a, @ri or data memory to a 1 1 orl a, #data or immediate to a 2 1 orl direct, a or a to direc t byte 2 1 orl direct, #data or immediate data to direct byte 3 2 xrl a, rn exclusive - or register to a 1 1 xrl a, direct exclusive - or direct byte to a 2 1 xrl a, @ri exclusive - or data memory to a 1 1 xrl a, #data exclusive - or immediate to a 2 1 xrl d irect, a exclusive - or a to direct byte 2 1 xrl direct, #data exclusive - or immediate to direct byte 3 2 clr a clear a 1 1 cpl a compliment a 1 1 swap a swap nibbles of a 1 1 rl a rotate a left 1 1 rlc a rotate a left through carry 1 1 rr a rotate a r ight 1 1 rrc a rotate a right through carry 1 1 mnemonic description size (bytes) instr. cycles boolean instruction clr c clear carry bit 1 1 clr bit clear bit 2 1 setb c set carry bit to 1 1 1 setb bit set bit to 1 2 1 cpl c complement carry b it 1 1 cpl bit complement bit 2 1 anl c,bit logical and between carry and bit 2 2 anl c,#bit logical and between carry and not bit 2 2 orl c,bit logical orl between carry and bit 2 2 orl c,#bit logical orl between carry and not bit 2 2 mov c,bit copy bit value into carry 2 1 mov bit,c copy carry value into bit 2 2 data transfer instructions mov a, rn move register to a 1 1 mov a, direct move direct byte to a 2 1 mov a, @ri move data memory to a 1 1 mov a, #data move immediate to a 2 1 mov rn, a move a to register 1 1 mov rn, direct move direct byte to register 2 2 mov rn, #data move immediate to register 2 1 mov direct, a move a to direct byte 2 1 mov direct, rn move register to direct byte 2 2 mov direct, direct move direct byte to direct byte 3 2 mov direct, @ri move data memory to direct byte 2 2 mov direct, #data move immediate to direct byte 3 2 mov @ri, a move a to data memory 1 1 mov @ri, direct move direct byte to data memory 2 2 mov @ri, #data move immediate to data memory 2 1 mov dptr, #data move immediate to data pointer 3 2 movc a, @a+dptr move code byte relative dptr to a 1 2 movc a, @a+pc move code byte relative pc to a 1 2 movx a, @ri move external data (a8) to a 1 2 movx a, @dptr move external data (a16) to a 1 2 mo vx @ri, a move a to external data (a8) 1 2 movx @dptr, a move a to external data (a16) 1 2 push direct push direct byte onto stack 2 2 pop direct pop direct byte from stack 2 2 xch a, rn exchange a and register 1 1 xch a, direct exchange a and direct byte 2 1 xch a, @ri exchange a and data memory 1 1 xchd a, @ri exchange a and data memory nibble 1 1 branching instructions acall addr 11 absolute call to subroutine 2 2 lcall addr 16 long call to subroutine 3 2 ret return from subroutine 1 2 reti r eturn from interrupt 1 2 ajmp addr 11 absolute jump unconditional 2 2 ljmp addr 16 long jump unconditional 3 2 sjmp rel short jump (relative address) 2 2 jc rel jump on carry = 1 2 2 jnc rel jump on carry = 0 2 2 jb bit, rel jump on direct bit = 1 3 2 jnb bit, rel jump on direct bit = 0 3 2 jbc bit, rel jump on direct bit = 1 and clear 3 2 jmp @a+dptr jump indirect relative dptr 1 2 jz rel jump on accumulator = 0 2 2 jnz rel jump on accumulator 1= 0 2 2 cjne a , direct, rel compare a, direct jne relative 3 2 cjne a, #d, rel compare a, immediate jne relative 3 2 cjne rn, #d, rel compare reg, immediate jne relative 3 2 cjne @ri, #d, rel compare ind, immediate jne relative 3 2 djnz rn, rel decrement register, jnz relative 2 2 djnz direct, rel de crement direct byte, jnz relative 3 2 miscellaneous instruction nop no operation 1 1 rn: any of the register r0 to r7 @ri: indirect addressing using register r0 or r1 #data: immediate data provided with instruction #data16: immediate data included wi th instruction bit: address at the bit level rel: relative address to program counter from +127 to ? 128 addr11: 11 - bit address range addr16: 16 - bit address range #d: immediate data supplied with instruction
vrs51x5 5 0 /560 _________________________________ _____________________________________________________________ www.ramtron.com page 6 of 40 special function registers (sfr) addresses 80h to ffh of the sfr address space can be accessed in direct addressing mode only. the following table lists the vrs51x550 / 560 special function registers . t able 6: s pecial f unction r egisters (sfr) sfr register sfr adrs bit 7 bit 6 bit 5 b it 4 bit 3 bit 2 bit 1 bit 0 reset value p0 80h - - - - - - - - sp 81h - - - - - - - - dpl 82h - - - - - - - - dph 83h - - - - - - - - reserved 84h pcon 87h smod - - - gf1 gf0 pdown idle 00000000b tcon 88h tf1 tr1 tf0 tr0 ie1 it1 ie0 it 0 00000000b tmod 89h gate1 c/t1 m1.1 m0.1 gate0 c/t0 m1.0 m0.0 00000000b tl0 8ah - - - - - - - - tl1 8bh - - - - - - - - th0 8ch - - - - - - - - th1 8dh - - - - - - - - p1 90h - - - - - - - - scon 98h sm0 sm1 sm2 ren tb8 rb8 ti ri 00000000b sbuf 99h - - - - - - - - wdtcon 9fh wdte - wdclr - - wdps2 wdps1 wdps0 0*0**000b p2 a0h - - - - - - - - ie a8h ea - et2 es et1 ex1 et0 ex0 00000000b p3 b0h - - - - - - - - ip b8h - - pt2 ps pt1 px1 pt0 px0 00000000b syscon bfh wdreset - - - - al ei 0******0b t2con c8h tf2 exf2 rclk tclk exen2 tr2 c/t2 cp/rl2 00000000b rcap2l cah - - - - - - - - 00000000b rcap2h cbh - - - - - - - - tl2 cch - - - - - - - - th2 cdh psw d0h cy ac f0 rs1 rs0 ov - p 00000000b acc e0h - - - - - - - - b f0h - - - - - - - -
vrs51x5 5 0 /560 ______________________________________________________________________________________________ www.ramtron.com page 7 of 40 program memory program memory the vrs51x550 includes 8 k b of on - chip program flash memory . the vrs51x560 includes 16kb program flash memory . f igure 3: vrs51 x 560 / vrs51 x 550 i nternal p rogram m emory rm 51 x 550 flash memory ( 8 k bytes ) 0000 h 3 fffh vrs 51 x 560 flash memory ( 16 k bytes ) 0000 h 1 fffh program status word register the psw register is a bit addressable register that contains the status flags (cy, ac, ov, p), user flag (f0) and register bank select bits (rs1, rs0) of the 8051 processor. t able 7: p rogram s tatus w ord r egister (psw) - sfr do h 7 6 5 4 3 2 1 0 cy ac f0 rs1 rs0 ov - p bit mnemonic description 7 cy carry bit 6 ac auxiliary carry bit from bit 3 to 4. 5 f0 user definer flag 4 rs1 r0 - r7 registers bank select bit 0 3 rs0 r0 - r7 registers bank select bit 1 2 ov overflow flag 1 - - 0 p parity flag rs1 rs0 active bank address 0 0 0 00h - 07h 0 1 1 08h - 0fh 1 0 2 10h - 17h 1 1 3 18 - 1fh data pointer the vrs51x550 and vrs51x560 each have one 16 - bit data pointer. the dptr is acc essed through two sfr addresses: dpl located at address 82h and dph located at address 83h. data memory the vrs51x550 and vrs51x560 each have a total of : 256 bytes of ram configured like the internal memory structure of a standard 8052. f igure 4: vrs51 x 550 / vrs51 x 560 ram m emory overview lower 128 bytes (00h to 7fh, bank 0 & bank 1) the lower 128 bytes of data memory (from 00h to 7fh) is summarized as follow s : address range 00h to 7fh can be accessed in direct and indirect addressing modes. address range 00h to 1fh includes r0 - r7 registers area. address range 20h to 2fh is bit addressable. address range 30h to 7fh is not bit addressable and can be used as general - purpose storage. upper 128 bytes (80h to ffh, bank 2 & bank 3) the upper 128 bytes of data memory ( from 80h to ffh ) can be accessed using indirect addressing or by using the bank mapping in direct addressing mode. f igure 5: vrs51 x 550 / vrs51 x 560 ram s tructure registers bank 0 r7 - r0 registers bank 1 r7 - r0 registers bank 2 r7 - r0 registers bank 3 r7 - r0 80 bytes of general purpose ram 00h 08h 10h 18h 20h 07 06 05 04 03 02 01 00 0f 0e 0d 0c 0b 0a 09 08 77 76 75 74 73 72 71 70 7f 7e 7d 7c 7b 7a 79 78 30h 128 bytes of indirect access ram (sp, r0,r1) 80h 7fh ffh 2fh sfr area direct or bit access only ffh 85 84 83 82 81 80 p0 sp dpl dph
vrs51x5 5 0 /560 ______________________________________________________________________________________________ www.ramtron.com page 8 of 40 description of peripherals system control register the syscon register is used for system control and is described in the following table. the wdreset bit (7) indicates whether the system has been reset due to overflow of the w atch d og t i mer. b it 0 of the syscon register is the ale output inhibit bit. setting this bit to 1 will inhibit the fosc/6 clock signal output to the ale pin. t able 8: s ystem c ontrol r egister (syscon) ? sfr bf h 7 6 5 4 3 2 1 0 wdreset unused x rame alei bit mnemonic description 7 wdreset this is the w atch d og t imer reset bit. it will be set to 1 when the reset signal generated by wdt overflows. 6 unused - 5 unused - 4 unused - 3 unused - 2 unused - 1 unused - 0 alei ale output inhibit bit, which is used to reduce emi. power control register vrs51x550 / 5 60 devices provide two power saving modes: idle and power down. these two modes serve to reduce the power consumption of the device. in idle mode, the processor is stopped but the oscill ator continues to run . the content s of the ram, i/o state and sfr registers are maintained and the timer and external interrupts are left operational . the processor will be woken up when an external event, triggering an interrupt, occurs. in power down m ode, the vrs51x550/560 oscillator and peripherals are disabled . the content s of the ram and the sfr registers, however, are maintained. the minimum vcc in power d own m ode is 2v . these power saving modes are controlled by the pdown and idle bits of the pco n register at address 87h. t able 9: p ower c ontrol r egister (pcon) - sfr 87 h 7 6 5 4 3 2 1 0 unused ram1 ram0 bit mnemonic description 7 smod 1: double the baud rate of the serial port frequency that was generated by timer 1. 0: normal serial port baud rate generated by timer 1. 6 5 4 3 gf1 general purpose flag 2 gf0 general purpose flag 1 pdown power d own mode control bit 0 idle idle mode control bit
vrs51x5 5 0 /560 ______________________________________________________________________________________________ www.ramtron.com page 9 of 40 input/output ports the vrs51x550 and vrs51x560 each have a total of 32 bi - directional i/o lines grouped in to four 8 - bit i/o ports. these i/os can be individually configured as input s or output s. with the exception of the p0 i/os, which are of the open drain type, each i/o consists of a transistor connected to ground a nd a weak pull - up resistor. writing a 0 in a given i/o port bit register will activate the transistor connected to vss . t his will bring the i/o to a low level. writing a 1 into a given i/o port bit register deactivates the transistor between the pin an d ground. in this case , the pull - up resistor will bring the corresponding pin to a high level. to use a given i/o as an input, a 1 must be writ t e n into its associated port register bit. by default, upon reset all the i/os are configured as input s . general structure of an i/o port the following elements establish the link between the core unit and the pins of the microcontroller: special function register (same name as port) output stage amplifier (the structure of this element varies with its auxiliary fu nction) from the next figure, one can see that the d flip - flop stores the value received from the internal bus after receiving a write signal from the core. also, note that the q output of the flip - flop can be linked to the internal bus by executing a re ad instruction. this is how one would read the content of the register. it is also possible to link the value of the pin to the internal bus. this is done by the ?read pin? instruction. in short, the user may read the value of the register or the pin. f igure 6: i nternal s tructure of o ne of the e ight i/o p ort l ines d flip-flop output stage q q ic pin read register internal bus write to register read pin structure of the p1, p2, p3 the following figure describes the general structure of the p1, p2 and p3 ports. note that the figure b elow does not show the intermediary logic that connects the register output with the output stage because this logic varies with the auxiliary function of each port. f igure 7: g eneral s tructure of the o utput s tage of p1, p2 and p3 d flip-flop q q ic pin read register internal bus write to register read pin vcc pull-up network x1 each line may be used independently as a logical input or output. when used as an input, the corresponding port register bit must be high.
vrs51x5 5 0 /560 ______________________________________________________________________________________________ www.ramtron.com page 10 of 40 structure of port 0 the internal structure of p0 is shown below. the auxiliary fu nction of this port requires a particular logic. as opposed to the other ports, p0 is truly bi - directional. in other words, when used as an input, it is considered to be in a floating logical state (high impedance state). this arises from the absence of th e internal pull - up resistance. the pull - up resistance is actually replaced by a transistor that is only used when the port is configured to access the external memory/data bus (ea=0). when used as an i/o port, p0 acts as an open drain port and the use of an external pull - up resistor is likely to be required for most applications. f igure 8: p ort p0? s particular structu re d flip-flop q q ic pin read register internal bus write to register read pin x1 control address a0/a7 vcc when p0 is used as an external memory bus input (for a movx instruction, for exam ple), the outputs of the register are automatically forced to 1. port p0 and p2 as address and data bus the output stage may receive data from two sources : the outputs of register p0 or the bus address itself multiplexed with the data bus for p0 the o utputs of the p2 register or the high byte (a8 th r ough a15) of the bus address for the p2 port f igure 9: p2 p ort s tructure d flip-flop q q ic pin read register internal bus write to register read pin vcc pull-up network x1 control address when the ports are used as an address or data bus, the special function regis ters p0 and p2 are disconnected from the output stage. the 8 bits of the p0 register are forced to 1 and the content of the p2 register remains constant. auxiliary port 1 functions the p ort 1 i/o pins are shared with the t2ex and t2 inputs as shown below : pin mnemonic function p1.0 t2 timer 2 counter input p1.1 t2ex timer 2 auxiliary input p1.2 p1.3 p1.4 p1.5 p1.6 p1.7
vrs51x5 5 0 /560 ______________________________________________________________________________________________ www.ramtron.com page 11 of 40 auxiliary p3 port functions the port 3 i/o pins are shared with the uart interface, the int0 and int1 interrupts, the timer 0 and timer 1 inputs and the #wr and #rd lines when external memory access is performed. f igure 10: p3 p ort s tructure d flip-flop q q ic pin read register internal bus write to register read pin x1 vcc auxiliary function: input auxiliary function: output the following table describes the auxiliary function of the p ort 3 i/o pins. t able 10: p3 a uxiliary f unction t able pin mnemonic function p3.0 rxd serial port: receive data in asynchronous mode. input and output data in synchronous mode. p3.1 txd serial port: transmit data in asynchronous mode. output c lock value in synchronous mode. p3.2 int0 external interrupt 0 timer 0 control input p3.3 int1 external interrupt 1 timer 1 control input p3.4 t0 timer 0 counter input p3.5 t1 timer 1 counter input p3.6 wr write signal for external memory p3.7 rd read signal for external memory software particularities concerning the ports some instructions allow the user to read the logic state of the output pin, while others allow the user to read the content of the associated port register. these instructio ns are called read - modify - write instructions. a list of these instructions may be found in the table below. upon execution of these instructions, the content of the port register (at least 1 bit) is modified. the other read instructions take the present state of the input into account. for example, the instruction anl p3, #01h obtains the value in the p3 register; performs the desired logic operation with the constant 01h; and recopies the result into the p3 register. when users want to take the present s tate of the inputs into account, they must first read these states and perform an and operation between the reading and the constant. mov a, p3; state of the inputs in the accumulator anl a, #01; and operation between p3 and 01h when the port is used as an output, the register contains information on the state of the output pins. measuring the state of an output directly on the pin is inaccurate because the electrical level depends mostly on the type of charge that is applied to it. the functions shown be low take the value of the register rather than that of the pin. t able 11: l ist of i nstructions that r ead and m odify the p ort u sing r egister v alues instruction function anl logical and ex: anl p0, a orl logical or ex: orl p2, #0111000 0b xrl exclusive or ex: xrl p1, a jbc jump if the bit of the port is set to 0 cpl complement one bit of the port inc increment the port register by 1 dec decrement the port register by 1 djnz decrement by 1 and jump if the result is not equal to 0 mov p., c copy the held bit c to the port clr p.x set the port bit to 0 setb p.x set the port bit to 1
vrs51x5 5 0 /560 ______________________________________________________________________________________________ www.ramtron.com page 12 of 40 port operation timing writing to a port (output) when an operation results in a modification of the content in a port register, the new value is placed at the output of the d flip - flop during the t12 period of the last machine cycle that the instruction needed to execute. it is important to note, however, that the output stage only samples the output of the registers on the p1 phase of each p eriod. it follows that the new value only appears at the output after the t12 period of the following machine cycle. reading a port (input) the reading of an i/o pin takes place: during t9 cycle for p0, p1 during t10 cycle for p2, p3 when the ports are co nfigured as i/os (see figure 25) in order to be sampled, the signal duration present on the i/o inputs must be longer than fosc/12. i/o ports driving capability the maximum allowable continuous current that the device can sink on an i/o port is defined b y the following: maximum sink current on one given i/o 10ma maximum total sink current for p0 26ma maximum total sink current for p1, 2, 3 15ma maximum total sink current on all i/o 70ma it is not recommended to exceed the sink current outlined in th e above table. doing so will likely make the low - level output voltage exceed the device?s specification and will likely affect device reliability. the vrs51x550 / vrs51x560 i/o port s are not designed to source current.
vrs51x5 5 0 /560 ______________________________________________________________________________________________ www.ramtron.com page 13 of 40 timers the vrs51x550 and vrs51x5 60 each include three 16 - bit timers: t0, t1 and t2. the timers can operate in two specific modes: event counting mode timer mode when operating in counting mode, the counter is incremented each time an external event, such as a transition in the logical state of the timer input (t0, t1, t2 input), is detected. when operating in timer mode, the counter is incremented by the microcontroller?s direct clock pulse or by a divided version of this pulse. timer 0 and timer 1 timers 0 and 1 have four modes of ope ration. these modes allow the user to change the size of the counting register or to authorize an automatic reload when provided with a specific value. timer 1 can also be used as a baud rate generator to generate communication frequencies for the serial i nterface. timer 0 and timer 1 are configured by the tmod and tcon registers. t able 12: t imer m ode c ontrol r egister (tmod) ? sfr 89 h 7 6 5 4 3 2 1 0 gate c/t m1 m0 gate c/t m1.0 m0.0 bit mnemonic description 7 gate1 1: enables ex ternal gate control (pin int1 for counter 1). when int1 is high, and trx bit is set (see tcon register), a counter is incremented every falling edge on the t1in input pin. 6 c/t1 selects timer or counter operation (timer 1). 1 = a counter operation is pe rformed 0 = the corresponding register will function as a timer. 5 m1.1 selects mode for timer/counter 1 4 m0.1 selects mode for timer/counter 1 3 gate0 if set, enables external gate control (pin int0 for counter 0). when int0 is high, and trx bit is se t (see tcon register), a counter is incremented every falling edge on the t0in input pin. 2 c/t0 selects timer or counter operation (timer 0). 1 = a counter operation is performed 0 = the corresponding register will function as a timer. 1 m1.0 selects m ode for timer/counter 0. 0 m0.0 selects mode for timer/counter 0. the table below summarizes the four modes of operation of timers 0 and 1. the timer - operating mode is selected by the bits m1 and m0 of the tmod register. t able 13: t imer /c ounter m ode d escription s ummary m1 m0 mode function 0 0 mode 0 13 - bit counter 0 1 mode 1 16 - bit counter 1 0 mode 2 8 - bit auto - reload counter/timer. the reload value is kept in th0 or th1, while tl0 or tl1 is incremented every machine cycle. wh en tlx overflows, the value of thx is copied to tlx. 1 1 mode 3 if timer 1 m1 and m0 bits are set to 1, timer 1 stops.
vrs51x5 5 0 /560 ______________________________________________________________________________________________ www.ramtron.com page 14 of 40 timer 0/timer 1 counter/timer functions timing function when operating as a timer, the counter is automatically incremented at every system cycle (fosc/12) . a flag is raised in the event of an overflow and the counter acquires a value of zero. these flags (tf0 and tf1) are located in the tcon register. t able 14: t imer 0 and 1 c ontrol r egister (tcon) ? sfr 88 h 7 6 5 4 3 2 1 0 tf1 tr1 tf0 tr0 ie1 it1 ie0 it0 bit mnemonic description 7 tf1 timer 1 overflow flag. set by hardware on timer/counter overflow. cleared by hardware on timer/counter overflow. cleared by hardware when processor vectors to interrupt routin e. 6 tr1 timer 1 run control bit. set/cleared by software to turn timer/counter on or off. 5 tf0 timer 0 overflow flag. set by hardware on timer/counter overflow. cleared by hardware when processor vectors to interrupt routine. 4 tr0 timer 0 run control bit. set/cleared by software to turn timer/counter on or off. 3 ie1 interrupt edge flag. set by hardware when external interrupt edge is detected. cleared when interrupt processed. 2 it1 interrupt 1 type control bit. set/cleared by software to specify f alling edge/low level triggered external interrupts. 1 ie0 interrupt 0 edge flag. set by hardware when external interrupt edge is detected. cleared when interrupt processed. 0 it0 interrupt 0 type control bit. set/cleared by software to specify falling e dge/low level triggered external interrupts. counting function when operating as a counter, the timer?s register is incremented at every falling edge of the t0, t1 and t2 signals located at the input of the timer. in this case, the signal is sampled at t he t10 phase of each machine cycle for timer 0, timer 1 and at t9 for timer 2. when the sampler sees a high immediately followed by a low in the next machine cycle, the counter is incremented. two machine cycles are required to detect and record an event. this reduces the counting frequency by a factor of 24 (24 times less than the oscillator?s frequency). operating modes the user may change the operating mode by varying the m1 and m0 bits of the tmod sfr. mode 0 a schematic representation of this mode of operation can be found in figure 1 1 . from the figure, we notice that the timer operates as an 8 - bit counter preceded by a divide - by - 32 prescaler composed of the 5lsb s of tl1. the register of the counter is configured to be 13 bits long. when an overflow causes the value of the register to roll over to 0, the tfx interrupt signal goes to 1. the count value is validated as soon as trx goes to 1 and the gate bit is 0, or when intx is 1. f igure 11: t imer /c ounter 1 m ode 0: 13 - b it c oun ter clk 12 t1pin c/t =0 c/t =1 tr1 gate int1 pin 0 1 0 7 4 mode 0 mode 1 0 7 tl1 tf1 int th1 clk control mode 1 mode 1 is almost identical to mode 0. they differ in that in mode 1, the counter uses the full 16 bits and has no prescaler. mode 2 in this mode, the register of the timer is configured as an 8 - bit automatically re - loadable counter. in mode 2, it is the lower byte tlx that is used as the counter. in the event of a counter overflow, the tfx flag is set to 1 and the value contained in thx, which is preset by software, is reloaded into the tlx counter. the value of t hx remains unchanged.
vrs51x5 5 0 /560 ______________________________________________________________________________________________ www.ramtron.com page 15 of 40 f igure 12: t imer /c ounter 1 m ode 2: 8 - bit a utomatic r eload 12 t1 pin c/t =0 c/t=1 tr1 gate 0 1 0 7 th1 clk tf1 int 0 7 int0 pin tl1 control reload mode 3 in mode 3, timer 1 is blocked as if its control bit, tr1, was set to 0. in this mode, timer 0?s registers tl0 and th0 are configured as two separate 8 - bit counters. additionally , the tl0 counter uses timer 0?s control bits c/t, gate, tr0, int0, tf0 and the th0 counter is held in timer mode (counting machine cycles) and gains control over tr1 and tf1 from timer 1. at this point, th0 controls the timer 1 interrupt. f igure 13: t imer /c ounter 0 m ode 3 clk 12 t0pin c/t =0 c/t =1 tr0 gate int0 pin 0 1 0 7 tl0 tf0 clk control interrupt 0 7 th0 tf1 clk control interrupt tr1
vrs51x5 5 0 /560 ______________________________________________________________________________________________ www.ramtron.com page 16 of 40 timer 2 timer 2 is a 16 - bit timer/counter. similar to t imers 0 and 1, timer 2 can operate as either an event cou nter or as a timer. the user may switch functions by writing to the c/t2 bit located in the t2con special function register. timer 2 has three operating modes: ?auto - load? ?capture?, and ?baud rate generator?. the t2con sfr configures the modes of operatio n of timer 2. the following table describes each bit in the t2con special function register. t able 15: t imer 2 c ontrol r egister (t2con) ? sfr c8 h 7 6 5 4 3 2 1 0 tf2 exf2 rclk tclk exen2 tr2 c/t2 cp/rl2 bit mnemonic description 7 tf2 timer 2 overflow flag: set by an overflow of timer 2 and must be cleared by software. tf2 will not be set when either rclk =1 or tclk =1. 6 exf2 timer 2 external flag change in state occurs when either a capture or reload is caused by a negative trans ition on t2ex and exen2=1. when timer 2 is enabled, exf=1 will cause the cpu to vector to the timer 2 interrupt routine. note that exf2 must be cleared by software. 5 rclk serial port receive clock source. 1: causes serial port to use timer 2 overflow pul ses for its receive clock in modes 1 and 3. 0: causes timer 1 overflow to be used for the serial port receive clock. 4 tclk serial port transmit clock. 1: causes serial port to use timer 2 overflow pulses for its transmit clock in modes 1 and 3. 0: cau ses timer 1 overflow to be used for the serial port transmit clock. 3 exen2 timer 2 external mode enable. 1: allows a capture or reload to occur as a result of a negative transition on t2ex if timer 2 is not being used to clock the serial port. 0: cause s timer 2 to ignore events at t2ex. 2 tr2 start/stop control for timer 2. 1: start timer 2 0: stop timer 2 1 c/t2 timer or counter select (timer 2) 1: external event counter falling edge triggered. 0: internal timer (osc/12) 0 cp/rl2 capture/reload select. 1: capture of timer 2 value into rcap2h, rcap2l is performed if exen2=1 and a negative transitions occurs on the t2ex pin. the capture mode requires rclk and tclk to be 0. 0: auto - reload reloads will occur either with timer 2 overflows or negativ e transitions at t2ex when exen2=1. when either rck =1 or tclk =1, this bit is ignored and the timer is forced to auto - reload on timer 2 overflow. as shown below, there are different combinations of control bits that may be used for the mode selection of timer 2. t able 16: t imer 2 m ode s election b its rclk + tclk cp/rl2 tr2 mode 0 0 1 16 - bit auto - reload mode 0 1 1 16 - bit capture mode 1 x 1 baud rate generator mode x x 0 off the details of each mode are described below. capture mo de in c apture m ode the exen2 bit value defines whether the external transition on the t2ex pin will be able to trigger the capture of the timer value. when exen2 = 0, timer 2 acts as a 16 - bit timer or counter, which, upon overflowing, will set bit tf2 (timer 2 overflow bit). this overflow can be used to generate an interrupt. f igure 14: t imer 2 in c apture m ode f osc 12 timer counter c/t2 0 1 t2 pin tr2 t2 ex pin 0 7 0 7 0 7 0 7 timer 2 interrupt exf2 exen2 rcap2l rcap2h tl2 th2 tf2 when exen2 = 1, the above still applies. in addition, it is possible to allow a 1 to 0 tra nsition at the t2ex input to cause the current value stored in the timer 2 registers (tl2 and th2) to be captured by the rcap2l
vrs51x5 5 0 /560 ______________________________________________________________________________________________ www.ramtron.com page 17 of 40 and rcap2h registers. furthermore, the transition at t2ex causes bit exf2 in t2con to be set, and exf2, like tf2, can generate a n interrupt. note that both exf2 and tf2 share the same interrupt vector. auto - reload mode in this mode, there are also two options. the user may choose either option by writing to bit exen2 in t2con. if exen2 = 0, when timer 2 rolls over, it not only set s tf2, but also causes the timer 2 registers to be reloaded with the 16 - bit value in the rcap2l and rcap2h registers previously initialised. in this mode, timer 2 can be used as a baud rate generator source for the serial port. if exen2=1, then timer 2 st ill performs the above operation, but a 1 to 0 transition at the external t2ex input will also trigger an anticipated reload of the timer 2 with the value stored in rcap2l, rcap2h , and set exf2. f igure 15: t imer 2 in auto - reload mo de f osc 12 timer counter c/t2 0 1 t2 pin tr2 t2 ex pin 0 7 0 7 0 7 0 7 timer 2 interrupt exf2 exen2 rcap2l rcap2h tl2 th2 tf2 baud rate generator mode the baud rate generator mode is activated when rclk is set to 1 and/or tclk is set to 1. this mode will be described in the serial port section. f igure 16: t imer 2 in automa tic b aud g enerator m ode f osc 2 timer counter c/t2 0 1 t2 pin tr2 t2 ex pin 0 7 0 7 0 7 0 7 exf2 exen2 rcap2l rcap2h tl2 th2 2 16 16 smod 0 1 timer 1 overflow 0 1 0 1 tclk rclk tx clock rx clock timer 2 interrupt request
vrs51x5 5 0 /560 ______________________________________________________________________________________________ www.ramtron.com page 18 of 40 serial port the serial port included in the vrs51x550 and the vrs51x560 can operate in full duplex; in other words, it can transmit and receive data simultaneously. this occurs at the same speed if one timer is assigned as the clock source for both transmission and reception, and at different speeds if transmission and reception are each controlled by their own timer. the serial port receive is buffered, which means that it can begin reception of a byte even if the processor has not retrieved the last byte from the receive register. however, if th e previously received byte has not been read by the time reception of the next byte is complete, the byte present in the receive buffer will be lost. the sbuf register provides access to the transmit and receive registers of the serial port. r ead ing from the sbuf register will access the receive register , while a write to the sbuf loads the transmit register . . serial port control register the scon ( serial p ort control ) register contain s control and status information, and includes the ninth data bit for transmit and receive (tb8 / rb8 if required ) mode selection bits and serial port interrupt bits (ti and ri). t able 17: s erial p ort c ontro l r egister (scon) ? sfr 98 h 7 6 5 4 3 2 1 0 sm0 sm1 sm2 ren tb8 rb8 ti ri bit mnemonic description 7 sm0 bit to select mode of operation (see table below) 6 sm1 bit to select mode of operation (see table below) 5 sm2 multiprocessor communication is possible in modes 2 and 3. in modes 2 or 3 if sm2 is set to 1, ri will not be activated if the received 9 th data bit (rb8) is 0. in mode 1, if sm2 = 1 then ri will not be activated if a valid stop bit was not received. 4 ren serial reception enable bit this bit must be set by software and cleared by software. 1: serial reception enabled 0: serial reception disabled 3 tb8 9 th data bit transmitted in modes 2 and 3 this bit must be set by software and cleared by software. 2 rb8 9 th data bit received i n modes 2 and 3. in mode 1, if sm2 = 0, rb8 is the stop bit that was received. in mode 0, this bit is not used. this bit must be cleared by software. 1 ti transmission interrupt flag. automatically set to 1 when: the 8 th bit has been sent in mode 0. au tomatically set to 1 when the stop bit has been sent in the other modes. this bit must be cleared by software. 0 ri reception interrupt flag automatically set to 1 when: the 8 th bit has been received in mode 0. automatically set to 1 when the stop bit ha s been sent in the other modes (see sm2 exception). this bit must be cleared by software. t able 18: s erial p ort m odes of o peration sm0 sm1 mode description baud rate 0 0 0 shift register f osc /12 0 1 1 8 - bit uart variable 1 0 2 9 - bit uart f osc /64 or f osc /32 1 1 3 9 - bit uart variable modes of operation the serial port on the vrs51x550 / 560 can operate in four different modes. in all four modes, a transmission is initiated by an instruction that uses the sbuf sfr as a destination r egister. in mode 0, reception is initiated by setting ri to 0 and ren to 1. an incoming start bit initiates reception in the other modes provided that ren is set to 1. the following section describe s the four modes.
vrs51x5 5 0 /560 ______________________________________________________________________________________________ www.ramtron.com page 19 of 40 mode 0 in this mode, the serial data e xits and enters through the rxd pin. txd is used to output the shift clock. the signal is composed of 8 data bits starting with the lsb. the baud rate in this mode is 1/12 the oscillator frequency. f igure 17: s erial p ort m ode 0 b lo ck d iagram transmission in mode 0 any instruction that uses sbuf as a destination register may initiate a transmission. the ?write to sbuf? signal also loads a 1 into the ninth position of the transmit shift register and tells the tx control block to be gin a transmission. the internal timing is such that one full machine cycle will elapse between a write to sbuf instruction and the activation of send. the send signal enables the output of the shift register to the alternate output function line of p3.0 and enables shift clock to the alternate output function line of p3.1. shift clock is high during t11, t12 and t1, t2 and t3, t4 of every machine cycle and low during t5, t6, t7, t8, t9 and t10. at t12 of every machine cycle in which send is active, the c ontents of the transmit shift register are shifted to the right by one position. zeros come in from the left as data bits shift out to the right. the tx control block sends its final shift and deactivates send while setting t1 after certain condition s are fulfilled: t he msb of the data byte is at the output position of the shift register; the 1 that was initially loaded into the ninth position is just to the left of the msb ; and all positions to the left of that contain zeros. once these conditions are met , the deactivation of send and the setting of t1 occur at t1 of the tenth machine cycle after the ?write to sbuf? pulse. reception in mode 0 when ren and r1 are set to 1 and 0 respectively, reception is initiated. the bits 11111110 are written to the rece ive shift register at t12 of the next machine cycle by the rx control unit. in the following phase, the rx control unit will activate receive. shift clock to the alternate output function line of p3.1 is enabled by receive. at every machine cycle, shift c lock makes transitions at t5 and t11. the contents of the receive shift register are shifted one position to the left at t12 of every machine in which receive is active. the value that comes in from the right is the value that was sampled at the p3.0 pin a t t10 of the same machine cycle. 1?s are shifted out to the left as data bits are shifted in from the right. the rx control block is flagged to do one last shift and load sbuf when the 0 that was initially loaded into the rightmost position arrives at the leftmost position in the shift register. internal bus sbuf d s q zero detector clk 1 write to sbuf tx control unit start tx clock shift send rx control unit ri ti 1 1 1 1 1 1 1 0 rx clock start shift receive shift register sbuf internal bus read sbuf ren ri rxd p3.0 input function rxd p3.0 txd p3.1 shift clock fosc/12 serial port interrupt shift rxd p3.0
vrs51x5 5 0 /560 ______________________________________________________________________________________________ www.ramtron.com page 20 of 40 mode 1 for an operation in mode 1, 10 bits are transmitted through txd or received through rxd. the transactions are composed of: a start bit (low), 8 data bits (lsb first) and one stop bit (high). the recepti on is completed once the stop bit sets the rb8 flag in the scon register. either timer 1 or timer 2 controls the baud rate in this mode. the following diagram shows the serial port structure when configured in mode 1. f igure 18: s e rial p ort m ode 1 and 3 b lock d iagram internal bus sbuf d s q zero detector clk 1 write to sbuf tx control unit start tx clock data send rx control unit ri ti rx clock start shift 9-bit shift register sbuf internal bus read sbuf load sbuf serial port interrupt shift bit detector 16 16 1-0 transition detector rxd 2 timer 2 overflow timer 1 overflow rclk tclk smod 0 1 0 1 0 1 load sbuf shift txd transmission in mode 1 transmission is initiated by any instruction that makes use of sbuf as a destination register. the ninth bit position of the transmit shift register is loaded by the ?write to sbuf? signal. this event also flags the tx c ontrol u nit that a transmission has been requested. it is after the next rollover in the divide - by - 16 counter when transmission actually begins at t1 of the machine cycle. it follows that the bit times are synchronized to the divide - by - 16 counter and not to the ?write to sbuf? signal. when a transmission begins, it places the start bit at txd. data transmission is activated one bit time later. this activation enables the output bit of the transmit shif t register to txd. one bit time after that, the first shift pulse occurs. in this mode, zeros are clocked in from the left as data bits are shifted out to the right. when the most significant bit of the data byte is at the output position of the shift regi ster, the 1 that was initially loaded into the ninth position is to the immediate left of the msb, and all positions to the left of that contain zeros. this condition flags the tx c ontrol u nit to shift one more time. reception in mode 1 one to zero transi tions at rxd initiate reception. it is for this reason that rxd is sampled at a rate of 16 multiplied by the established baud rate. when a transition is detected, 1ffh is written into the input shift register and the divide - by - 16 counter is immediately res et. the divide - by - 16 counter is reset in order to align its rollovers with the boundaries of the incoming bit times. in total, there are 16 states in the counter. during the 7 th , 8 th and 9 th counter states of each bit time; the bit detector samples the val ue of rxd. the accepted value is the value that was seen in at least two of the three samples. the purpose of doing this is for noise rejection. if the value accepted during the first bit time is not zero, the receive circuits are reset and the unit goes b ack to searching for another one to zero transition. all false start bits are rejected by doing this. if the start bit is valid, it is shifted into the input shift register, and the reception of the rest of the frame will proceed. for a receive operation, the data bits come in from the right as 1?s shift out on the left. as soon as the start bit arrives at the leftmost position in the shift register, (9 - bit register), it tells the rx control block to perform one last shift operation: to set ri and to load s buf and rb8. the signal to load sbuf and rb8, and to set ri, will be generated if, and only if, the following conditions are met at the time the final shift pulse is generated: either sm2 = 0 or the received stop bit = 1 ri = 0
vrs51x5 5 0 /560 ______________________________________________________________________________________________ www.ramtron.com page 21 of 40 if both conditions are me t, the stop bit goes into rb8, the 8 data bits go into sbuf and ri is activated. if one of these conditions is not met, the received frame is lost. at this time, whether the above conditions are met or not, the unit goes back to searching for a one to zero transition in rxd. mode 2 in mode 2 , a total of 11 bits are transmitted through txd or received through rxd. the transactions are composed of: a start bit (low), 8 data bits (lsb first), a programmable ninth data bit and one stop bit (high). for transm ission, the ninth data bit comes from the tb8 bit of scon. for example, the parity bit p in the psw could be moved into tb8. in the case of receive, the ninth data bit is automatically written into rb8 of the scon register. in mode 2, the baud rate is pr ogrammable to either 1/32 or 1/64 the oscillator frequency. f igure 19: s erial p ort m ode 2 b lock d iagram internal bus sbuf d s q zero detector clk 1 write to sbuf tx control unit start tx clock data send rx control unit ri ti rx clock control start shift 9-bit shift register sbuf internal bus read sbuf load sbuf serial port interrupt shift bit detector 16 16 1-0 transition detector rxd 2 fosc/2 smod 0 1 load sbuf shift txd stop sample mode 3 in mode 3, 11 bits are transmitted through txd or received through rxd. the transactions a re composed of: a start bit (low), 8 data bits (lsb first), a programmable ninth data bit and one stop bit (high). mode 3 is identical to mode 2 in all respects but one; the baud rate. either timer 1 or timer 2 generates the baud rate in mode 3. f igure 20: s erial p ort m ode 3 b lock d iagram internal bus sbuf d s q zero detector clk 1 write to sbuf tx control unit start tx clock data send rx control unit ri ti rx clock start shift 9-bit shift register sbuf internal bus read sbuf load sbuf serial port interrupt shift bit detector 16 16 1-0 transition detector rxd 2 timer 2 overflow timer 1 overflow rclk tclk smod 0 1 0 1 0 1 load sbuf shift txd sample
vrs51x5 5 0 /560 ______________________________________________________________________________________________ www.ramtron.com page 22 of 40 mode 2 and 3: additional information as mentioned earlier, for an operation in these modes, 11 bits are transmitted through txd or received through rxd. the signal com prises: a logical low start bit, 8 data bits (lsb first), a programmable ninth data bit and one logical high stop bit. on transmi ssion , the tb8 of the scon register can be assigned the value of 0 or 1. on receive , the ninth data bit goes into rb8 in scon . the baud rate is programmable to either 1/32 or 1/64 the oscillator frequency in mode 2. mode 3 may have a variable baud rate generated from either timer 1 or timer 2 depending on the states of tclk and rclk. transmission in mode 2 and mode 3 the transm ission is initiated by any instruction that makes use of sbuf as the destination register. the ninth bit position of the transmit shift register is loaded by the ?write to sbuf? signal. this event also informs the tx control unit that a transmission has be en requested. after the next rollover in the divide - by - 16 counter, a transmission actually begins at t1 of the machine cycle. the bit times are synchronized to the divide - by - 16 counter and not to the ?write to sbuf? signal, as in the previous mode. transm issions begin when the send signal is activated, which places the start bit at txd. data is activated one bit time later. this activation enables the output bit of the transmit shift register to txd. the first shift pulse occurs one bit time after that. t he first shift clocks a stop bit (1) into the ninth bit position of the shift register to txd. thereafter, only zeros are clocked in. thus, as data bits shift out to the right, zeros are clocked in from the left. when tb8 is at the output position of the s hift register, the s top bit is just to the left of tb8, and all positions to the left of that contain zeros. this condition signals to the tx control unit to shift one more time and set ti, while deactivating send. this occurs at the eleventh divide - by - 16 rollover after ?write to sbuf?. reception in mode 2 and mode 3 one to zero transitions at rxd initiate reception. it is for this reason that rxd is sampled at a rate of 16 multiplied by the established baud rate. when a transition is detected, the 1ffh i s written into the input shift register and the divide - by - 16 counter is immediately reset. during the 7 th , 8 th and 9 th counter states of each bit time; the bit detector samples the value of rxd. the accepted value is the value that was seen in at least tw o of the three samples. if the value accepted during the first bit time is not zero, the receive circuits are reset and the unit goes back to searching for another one to zero transition. if the start bit is valid, it is shifted into the input shift regist er and the reception of the rest of the frame will proceed. for a receive operation, the data bits come in from the right as 1?s shift out on the left. as soon as the s tart bit arrives at the leftmost position in the shift register (9 - bit register), it te lls the rx control block to do one more shift to set ri and load sbuf and rb8. the signal to set ri and load sbuf and rb8 will be generated if, and only if, the following conditions are satisfied at the instance when the final shift pulse is generated: ei ther sm2 = 0 or the received 9 th bit is equal to 1 ri = 0 if both conditions are met, the ninth data bit received goes into rb8, and the first 8 data bits go into sbuf. if one of these conditions is not met, the received frame is lost. one bit time later , whether the above conditions are met or not, the unit goes back to searching for a one to zero transition at the rxd input. please note that the value of the received s top bit is unrelated to sbuf, rb8 or ri.
vrs51x5 5 0 /560 ______________________________________________________________________________________________ www.ramtron.com page 23 of 40 uart baud rates calculation in mode 0, th e baud rate is fixed and is represented by the following formula: in mode 2, the baud rate depends on the value of the smod bit in the pcon sfr. from the formula below, we can see that if smod = 0 (which is the value on reset), the baud rate is 1/ 32 the oscillator frequency. the timer 1 and/or timer 2 overflow rate determines the baud rates in modes 1 and 3. generating baud rate s with timer 1 when timer 1 functions as a baud rate generator, the baud rate in modes 1 and 3 are determined b y the timer 1 overflow rate. timer 1 must be configured as an 8 - bit timer (tl1) with auto - reload with th1 value when an overflow occurs (mode 2). in this application, the timer 1 interrupt should be disabled. the two following formulas can be u sed to calculate the baud rate and the reload value to be written in to the th1 register. the value to write into the th1 register is defined by the following formula: it is possible to use timer 1 in 16 - bit mode to generate the baud rate fo r the serial port. to do this, leave the timer 1 interrupt enabled, configure the timer to run as a 16 - bit timer (high nibble of tmod = 0001b) and use the timer 1 interrupt to perform a 16 - bit software reload. this can achieve very low baud rates. generat ing baud rates with timer 2 timer 2 is often preferred to generate the baud rate, as it can be easily configured to operate as a 16 - bit timer with auto - reload . this enables much better resolution than if using timer 1 in 8 - bit auto - reload mode. the baud r ate using timer 2 is defined as: the timer can be configured as either a timer or a counter in any of its three running modes. in typical application, it is configured as a timer (c/t2 is set to 0). to make the timer 2 operate as a baud rate ge nerator the tclk and rclk bits of the t2con register must be set to 1. the baud rate generator mode is similar to the auto - reload mode in that an overflow in th2 causes the timer 2 registers to be reloaded with the 16 - bit value in registers rcap2h and rca p2l, which are preset by software. however, when timer 2 is configured as a baud rate generator, its clock source is osc/2. mode 0 baud rate = oscillato r frequency 12 mode 2 baud rate = 2 smod x (oscillator frequency) 64 mode 1, 3 baud rate = 2 smod x fosc 32 x 12(256 ? th1) th1 = 256 - 2 smod x fosc 32 x 12x (baud rate) mode 1, 3 baud rate = 2 smod x timer 1 overflow rate 32 mode 1, 3 baud rate = timer 2 overflow rate 16
vrs51x5 5 0 /560 ______________________________________________________________________________________________ www.ramtron.com page 24 of 40 the following formula can be used to calculate the baud rate in modes 1 and 3 using the timer 2: the formula below is used to define the reload value to write into the rcap2h, rcap2l registers to achieve a given baud rate. in the above formula, rcap2h and rcap2l are the content of rcap2h and rcap2l taken as a 16 - bit unsigned integer. note that a rollover in th2 does no t set tf2, and will not generate an interrupt. because of this, the timer 2 interrupt does not have to be disabled when timer 2 is configured in baud rate generator mode. also, if exen2 is set, a 1 - to - 0 transition in t2ex will set exf2 but will not cause a reload from rcap2x to tx2. therefore, when timer 2 is used as a baud rate generator, t2ex can be used as an extra external interrupt. furthermore, when timer 2 is running (tr2 is set to 1) as a timer in baud rate generator mode, the user should not try t o read or write to th2 or tl2. when operating under these conditions, the timer is being incremented every state time and the results of a read or write command may be inaccurate. the rcap2 registers, however, may be read but should not be written to, bec ause a write may overlap a reload operation and generate write and/or reload errors. in this case, before accessing the timer 2 or rcap2 registers, be sure to turn the timer off by clearing tr2. modes 1, 3 baud rate = oscillator frequency 32x[65536 ? (rcap2h, rcap2l)] (rcap2h, rcap2l) = 65536 - fosc 32x[baud rate]
vrs51x5 5 0 /560 ______________________________________________________________________________________________ www.ramtron.com page 25 of 40 interrupts the vrs51x550 / 560 devices have 8 interrupts (9 i f we include the wdt) and 7 interrupt vectors (including reset) used for handl ing . the interrupt can be enabled via the ie register shown below: t able 19: ien0 i nterrupt e nable r egister ? sfr a8 h 7 6 5 4 3 2 1 0 ea - et2 es et1 ex1 et0 ex0 bit mnemonic description 7 ea disables all interrupts 0: no interrupt acknowledgment 1: each interrupt source is individually enabled or disabled by setting or clearing its enable bit. 6 - reserved 5 et2 timer 2 interrupt enable bit 4 es serial port interrupt enable bit 3 et1 timer 1 interrupt enable bit 2 ex1 external interrupt 1 enable bit 1 et0 timer 0 interrupt enable bit 0 ex0 external interrupt 0 enable bit the following figure illustrates the various interrupt sources on the vrs51x550 / 560 . f igure 21: i nterrupt s ources ie0 it0 int0 tf0 ie1 it1 int1 tf1 t1 ri tf2 exf2 interrupt sources interrupt vectors the following table specifies each interrupt source, its flag and its vector address. t able 20: i nterrupt v ector c orresp onding f lags ans v ector a ddress interrupt source flag vector address reset (+ wdt) wdreset 0000h int0 ie0 0003h timer 0 tf0 000bh int1 ie1 0013h timer 1 tf1 001bh serial port ri+ti 0023h timer 2 tf2+exf2 002bh external interrupts the vrs51x550 and the vrs51x560 have two external interrupt inputs named int0 and int1. these interrupt lines are shared with p3.2 and p3.3. the bits it0 and it1 of the tcon register determine whether the external interrupts are level or edge sensitive. if itx = 1, the interrupt will be raised when a 1 to 0 transition occurs at the interrupt pin. for the interrupt to be noticed by the processor, the duration of the sum high and low condition must be at least equal to 12 oscillator cycles. if itx = 0, the interrupt will occur when a logic low condition is present on the interrupt pin. the state of the external interrupt, when enabled, can be monitored using the flags, ie0 and ie1 of the tcon register that are set when the interrupt condition occurs. in the case where t he interrupt was configured as edge sensitive, the associated flag is automatically cleared when the interrupt is serviced. if the interrupt is configured as level sensitive, then the interrupt flag must be cleared by the software.
vrs51x5 5 0 /560 ______________________________________________________________________________________________ www.ramtron.com page 26 of 40 timer 0 and timer 1 int errupt both timer 0 and timer 1 can be configured to generate an interrupt when a rollover of the timer/counter occurs (except timer 0 in mode 3). the tf0 and tf1 flags serve to monitor timer overflow occurring from timer 0 and timer 1. these interrupt fl ags are automatically cleared when the interrupt is serviced. timer 2 interrupt a timer 2 interrupt can occur if tf2 and/or exf2 flags are set to 1 and if the timer 2 interrupt is enabled. the tf2 flag is set when a rollover of the timer 2 counter/tim er occurs. the exf2 flag can be set by a 1 to 0 transition on the t2ex pin by the software. note that neither flag is cleared by the hardware upon execution of the interrupt service routine. the service routine may have to determine whether it was tf2 or exf2 that generated the interrupt. these flag bits will have to be cleared by the software. every bit that generates interrupts can either be cleared or set by the software, yielding the same result as when the operation is done by the hardware. in other words, pending interrupts can be cancelled and interrupts can be generated by the software. serial port interrupt the serial port can generate an interrupt upon byte reception or once the byte transmission is complete. those two conditions share the sam e interrupt vector and it is up to the user - developed interrupt service routine software to ascertain the cause of the interrupt by examining the serial interrupt flags ri and ti. note that neither of these flags is cleared by the hardware upon execution of the interrupt service routine. the software must clear these flags. execution of an interrupt when the processor receives an interrupt request, an automatic jump to the desired subroutine occurs. this jump is similar to executing a branch to a subrout ine instruction: the processor automatically saves the address of the next instruction on the stack. an internal flag is set to indicate that an interrupt is taking place, and then the jump instruction is executed. an interrupt subroutine must always end w ith the reti instruction. this instruction allows users to retrieve the return address placed on the stack. the reti instruction also allows updating of the internal flag , which will take into account an interrupt with the same priority. interrupt enabl e and interrupt priority when the vrs51x550 / 560 are initialized, all interrupt sources are inhibited by the bits of the ie register being reset to 0. it is necessary to start by enabling the interrupt sources that the application requires. this is achiev ed by setting bits in the ie register, as discussed previously. this register is part of the bit addressable internal ram. for this reason, each bit can be modified individually with one instruction without having to modify the other bits of the register. all interrupts can be inhibited by setting ea to 0. the order in which interrupts are serviced is shown in the following table: t able 21: i nterrupt n atural p riority interrupt source reset + wdt (highest priority) ie0 tf0 ie1 tf1 ri+ti tf2+exf2 (lowest priority)
vrs51x5 5 0 /560 ______________________________________________________________________________________________ www.ramtron.com page 27 of 40 modifying the interrupt order of priority the vrs51x550 and vrs51x560 devices allow user s to modify the natural priority of the interrupts. one may modify the order by programming the bits in the ip (interrupt prio rity) register. when any bit in this register is set to 1, it gives the corresponding source a greater priority than interrupts coming from sources that don?t have their corresponding ip bit set to 1. the ip register is represented in the table below : t ab le 22: ip i nterrupt p riority r egister ? sfr b8 h 7 6 5 4 3 2 1 0 ea - et2 es et1 ex1 et0 ex0 bit mnemonic description 7 - 6 - 5 pt2 gives timer 2 interrupt higher priority 4 ps gives serial port interrupt higher priority 3 pt 1 gives timer 1 interrupt higher priority 2 px1 gives int1 interrupt higher priority 1 pt0 gives timer 0 interrupt higher priority 0 px0 gives int0 interrupt higher priority watch d og timer the w atch d og t imer (wdt) is a 16 - bit free - running counter tha t generates a reset signal if the counter overflows. the wdt is useful for systems that are susceptible to noise, power glitches and other conditions that can cause the software to go into infinite dead loops or runaways. the wdt function gives the user so ftware a recovery mechanism from abnormal software conditions. the w atch d og t imer o n the vrs51x550 / 560 is driven by the oscillator. to enable the wdt, the user must set bit 7 (wdte) of the watchdog timer control register (wdtcon) to 1. once wdte has been set to 1, the 16 - bit counter will start to count with the selected time base source clock configured in wdps2~wdps0. the watchdog timer will generate a reset signal if an overflow has taken place. the wdte bit will be cleared to 0 automatically when the de vice is reset by either the hardware or a wdt reset. once the wdt is enabled, the user software must clear it periodically. in the case where the wdt is not cleared, its overflow will trigger a reset of the device. the user should check the wdreset bit of the syscon register whenever an unpredicted reset has taken place. the wdt timeout delay can be adjusted by configuring the clock divider input for the time base source clock of the wdt. to select the divider value, bit2 - bit0 (wdps2~wdps0) of the wdtcon sh ould be set accordingly. clearing the wdt is accomplished by setting the clr bit of the wdtcon to 1. this action will clear the contents of the 16 - bit counter and force it to restart. watch d og timer registers three registers of the vrs51x550 / 560 devices ar e associated with the w atch d og t imer: wdtcon, the wdtlock and the syscon registers. the wdtcon register allows the user to enable the wdt, to clear the counter and to divide the clock source. the wdreset bit of the syscon register indicates whether the w at ch d og t imer has caused the device reset. t able 23: w atchdog t imer r egisters : wdtcon ? sfr 9f h 7 6 5 4 3 2 1 0 wdte unused wdclr unused wdtps [2:0] bit mnemonic description 7 wdte watch d og timer enable bit 6 unused - 5 wdclr w atch d og timer counter clear bit [4:3] unused - 2 1 0 wdps [2:0] watchdog timer clock source divider
vrs51x5 5 0 /560 ______________________________________________________________________________________________ www.ramtron.com page 28 of 40 the table below shows examples of w atchdog timeout period s that the user will obtain for different values of the wdpsx bits of the w atch d og t ime r r egister. t able 24: w atch d og t imer period vs . wdwdps [2:0] bit wdps [2:0] fosc division factor wdt timeout (ms) @ 20mhz 000 8 26.2 001 16 52.4 010 32 104.8 011 64 209.7 100 128 419.4 101 256 838.8 110 512 1677.7 111 1024 3 355.4 the system control register the s ystem c ontrol register is used to monitor the status of the w atch d og t imer and inhibit the address latch enable signal output. t able 25: t he s ystem c ontrol r egister (syscon) ? sfr bf h 7 6 5 4 3 2 1 0 wdreset unused xrame alei bit mnemonic description 7 wdreset watch d og timer reset status bit [6:3] unused - 2 unused - 1 unused - 0 alei 1: enable electromagnetic interference reducer 0: disable electromagnetic interference reducer the wdr eset bit of the syscon register is the w atch d og t imer r eset bit. it will be set to 1 when a reset signal is generated by the wdt overflow. the user should check the wdreset bit state if a reset has taken place in application s where the w atch d og timer is ac tivated . reduced emi function the vrs51x550 and vrs51x560 devices can also be set up to reduce emi (electromagnetic interference) by setting bit 0 (alei) of the syscon register to 1. this function will inhibit the fosc/6hz clock signal output to the ale pi n. crystal consideration the crystal connected to the vrs51x550 / 560 oscillator input should be of a parallel type, operating in fundamental mode. the following table shows the value of the capacitors and feedback resistor that must be used at different ope rating frequencies. xtal 3mhz 6mhz 12mhz 16mhz 25mhz c1 30 pf 30 pf 30 pf 30 pf 15 pf c2 30 pf 30 pf 30 pf 30 pf 15 pf r open open open open 62ko xtal 33mhz 40mhz c1 5 pf 2 pf c2 5 pf 2 pf r 6.8k 4.7k note: oscillator circuits may differ with different crystals or ceramic resonators in higher oscillation frequency. crystals or ceramic resonator characteristics vary from on e manufacturer to the other. the user should review the technical literature provided with any crystal or ceramic resonator s or contact the manufacturer to select the appropriate values for external components. vrs 51 x 550 vrs 51 x 560 xtal 1 xtal 2 xtal r c 1 c 2
vrs51x5 5 0 /560 ______________________________________________________________________________________________ www.ramtron.com page 29 of 40 operating conditions t able 26: o perating c onditions symbol description min. typ. max. unit remarks ta operating temperature - 40 25 85 oc ambient temperature operating ts storage temperature - 55 25 155 oc vcc5v supply voltage 4.5 5.0 5.5 v 5 volt device vcc3v supply voltage 3.0 3.3 3.6 v 3.3 volt device fosc 25 oscillator frequency 3.0 - 40 mhz for 5v & 3.3v application dc characteristics t able 27: dc c haracteristics a mbient t emperature = - 40c to 85c, 3.0v to 5.5 v symbol parameter valid min. max. unit test conditions vil1 input low voltage port 0 ,1,2,3,4,#ea - 0.5 0.8 v vil2 input low voltage res, xtal1 0 0 . 8 v vih1 input high voltage port 0,1,2,3,4,#ea 2.0 vcc+0.5 v vi h2 input high voltage res, xtal1 70% vcc vcc+0.5 v vol1 output low voltage port 0, ale, #psen 0.45 v iol=3.2ma vol2 output low voltage port 1,2,3,4 0.45 v iol=1.6ma 2.4 v ioh= - 800ua (vcc = 5v) voh1 output high voltage port 0 90% vcc v ioh= - 80ua 2.4 v ioh= - 60ua (vcc = 5v) voh2 output high voltage port 1, 2,3,4,ale,#psen 90% vcc v ioh= - 10ua iil logical 0 input current port 1,2,3,4 - 75 ua vin=0.45v itl logical transition current port 1,2,3,4 - 650 ua vin=2.ov ili input leakage current port 0, #ea + 10 ua 0.45v vrs51x5 5 0 /560 ______________________________________________________________________________________________ www.ramtron.com page 30 of 40 ac characteristics t able 28: ac c haracteristics fosc 16 variable fosc symbol parameter valid cycle min. type max. min. type max. unit t lhll ale pulse width rd/wrt 115 2xt - 10 ns t avll address valid to ale low rd/wrt 43 t - 20 ns t llax address hold after ale low rd /wrt 53 t - 10 ns t lliv ale low to valid instruction in rd 240 4xt - 10 ns t llpl ale low to #psen low rd 53 t - 10 ns t plph #psen pulse width rd 173 3xt - 15 ns t pliv #psen low to valid instruction in rd 177 3xt - 10 ns t pxix instruction hold after #psen rd 0 0 ns t pxiz instruction float after #psen rd 87 t + 25 ns t avi v address to valid instruction in rd 292 5xt - 20 ns t plaz #psen low to address float rd 10 10 ns t rlrh #rd pulse width rd 365 6x t - 10 ns t wlwh #wr pulse width wrt 365 6xt - 10 ns t rldv #rd low to valid data in rd 302 5xt - 10 ns t rhdx data hold after #rd rd 0 0 ns t rhdz data float after #rd rd 145 2xt + 20 ns t lldv ale low to valid data in rd 590 8xt - 10 ns t avdv address to valid data in rd 542 9xt - 20 ns t llyl ale low to #wr high or #rd low rd/wrt 178 197 3xt - 10 3xt + 10 ns t avyl address valid to #wr or #rd low rd/wrt 230 4xt - 20 ns t qvwh data valid to #wr high wrt 403 7xt - 35 ns t qvwx data valid to #wr transition wrt 38 t - 25 ns t whqx data hold after #wr wrt 73 t + 10 ns t rlaz #rd low to address float rd 5 ns t yalh #w r or #rd high to ale high rd/wrt 53 72 t - 10 t+10 ns t chcl clock fall time ns t clcx clock low time ns t clch clock rise time ns t chcx clock high time ns t,tc lcl clock period 63 1/fosc ns
vrs51x5 5 0 /560 ______________________________________________________________________________________________ www.ramtron.com page 31 of 40 data memory read cycle timing the following timing diagram shows what occurs at each sign al during a data memory read cycle. f igure 24: d ata m emory r ead c ycle t iming t12 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t1 t2 t3 osc ale #psen #rd port2 port0 address a15-a8 inst in a7-a0 float data in float address or float 7 8 1 2 5 3 3 4 6 float
vrs51x5 5 0 /560 ______________________________________________________________________________________________ www.ramtron.com page 32 of 40 program memory read cycle timing the following timing diagram shows what occurs at each signal during a program memory rea d cycle. f igure 25: p rogram m emory r ead c ycle t12 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t1 t2 t3 osc ale #psen #rd,#wr port2 port0 float a7-a0 float float float float a7-a0 inst in inst in address a15-a8 address a15-a8 1 2 5 7 3 3 4 6 8
vrs51x5 5 0 /560 ______________________________________________________________________________________________ www.ramtron.com page 33 of 40 data memory write cycle timing the following timing diagram shows what occurs at each signal during a data memory write cycle. f igure 26: d ata m emory w rite c ycle t iming t12 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t1 t2 t3 osc ale #psen #wr port2 port0 address a15-a8 inst in a7-a0 data out address or float 1 5 float 2 2 3 6 4
vrs51x5 5 0 /560 ______________________________________________________________________________________________ www.ramtron.com page 34 of 40 i/o port timing the following timing diagram shows what occurs during i/o port timing. f igure 27: i/o p orts t iming t7 t8 t9 t10 t11 t12 t1 t2 t3 t4 t5 t6 t7 t8 sampled sampled sampled current data next data x1 inputs p0,p1 inputs p2,p3 output by mov px, src rxd at serial port shift clock mode 0
vrs51x5 5 0 /560 ______________________________________________________________________________________________ www.ramtron.com page 35 of 40 external clo ck timing f igure 28: t iming r equirement of e xternal c lock (vss= 0.0v is assumed ) tclcl tchcx tclch tchcl tclcx 70% vdd 20% vdd-0.1v vdd - 0.5v 0.45v external program memory read cycle the following timing diagram shows what occurs at each signal during an external program memory read cycle. f igure 29: e xternal p rogram m emory r ead c ycle tplph tpxix tpxiz instruction in a0-a7 a8-a15 p2.0-p2.7 or ab-a15 from dph a0-a7 tllpl tlhll tavll tllax tplaz tpliv taviv #psen ale port 0 port2
vrs51x5 5 0 /560 ______________________________________________________________________________________________ www.ramtron.com page 36 of 40 external data memory read cycle the following timing diagram shows what occurs at each signal during an external data memory re ad cycle. f igure 30: e xternal d ata m emory r ead c ycle tlldv tllyl trlrh trlaz a0-a7 from ri or dpl tavll tllax tavyl tavdv p2.0-p2.7 or a8 -a15 from dph a8-a15 from pch data in trhdx trhdz a0-a7 from pcl instrl in trldv tyhlh #psen ale #rd port 0 port 2
vrs51x5 5 0 /560 ______________________________________________________________________________________________ www.ramtron.com page 37 of 40 external data memory write cycle the following timing diagram shows what occurs at each signal during an external data memory write cycle. f igure 31: e xternal d ata m emory w rite c ycle #psen twlwh tllyl tlhll tavll tllax tqvwx tqvwh twhqx tyhlh tavyl ale #wr port 0 port 2 p2.0-p2.7 or a8-a15 from dph data out a0-a7 from ri or dpl a8-a15 from pch a0-a7 from pcl instrl in .
vrs51x5 5 0 /560 ______________________________________________________________________________________________ www.ramtron.com page 38 of 40 plastic chip carrier (plcc - 44 ) vrs 51 x 550 vrs 51 x 560 plcc - 44 d hd e he gd e c b1 b note: 1. dimensions d & e do not include interlead flash. 2. di mension b1 does not include dambar protrusion/intrusion. 3. controlling dimension: inch 4. general appearance spec should be based on final visual inspection spec. ge y a2 a1 a l t able 29: d imensions of plcc - 44 c hip c arrier dimension in inch dimension in mm symbol minimal/maximal minimal/maximal a - /0.185 - /4.70 al 0.020/ - 0.51/ a2 0.145/0.155 3.68/3.94 bl 0.026/0.032 0.66/0.81 b 0.016/0.022 0.41/0.56 c 0.008/0.014 0.20/0.36 d 0.648/0.658 16.46/16.7 1 e 0.648/0.658 16.46/16.71 e 0.050 bsc 1.27 bsc gd 0.590/0.630 14.99/16.00 ge 0.590/0.630 14.99/16.00 hd 0.680/0.700 17.27/17.78 he 0.680/0.700 17.27/17.78 l 0.090/0.110 2.29/2.79 ? - /0.004 - /0.10 ?y / /
vrs51x5 5 0 /560 ______________________________________________________________________________________________ www.ramtron.com page 39 of 40 quad flat package (qfp - 44 ) vrs 51 x 550 vrs 51 x 560 qfp - 44 e 2 e 1 e d 2 d 1 d e seating plane c e1 note: 1. dimensions d1 and e1 do not include mold protrusion. 2. allowance protrusion is 0.25mm per side. 3. dimensions d1 and e1 do not include mold mismatch and are determined datum plane. 4. dimension b does not in clude dambar protrusion. 5. allowance dambar protrusion shall be 0.08 mm total in excess of the b dimension at maximum material condition. dambar cannot be located on the lower radius of the lead foot. l c l1 s s b a a1 a2 t able 30: d imensions of qfp - 44 c hip c arrier dimension in in. dimension in mm symbol minimal/maximal minimal/maximal a - /0.100 - /2.55 al 0.006/0.014 0.15/0.35 a2 0.071 / 0.087 1.80/2.20 b 0.012/0.018 0.30/0.45 c 0.004 / 0.009 0.09/0.20 d 0.520 bsc 13.20 bsc d1 0.394 bsc 10.00 bsc d2 0.315 8.00 e 0.520 bsc 13.20 bsc e1 0.394 bsc 10.00 bsc e2 0.315 8.00 e 0.031 bsc 0.80 bsc l 0.029 / 0.041 0.73/1.03 l1 0.063 1.60 r1 0.005/ - 0.13/ - r2 0.005/0.012 0.13/0.30 s 0.008/ - 0.20/ - 0 0 /7 as left ? 1 0 / - as left ? 2 10 ref as left ? 3 7 ref as left ?c 0.004 0.10 3 gage plane 0.25mm r1 2 r2
vrs51x5 5 0 /560 ______________________________________________________________________________________________ www.ramtron.com page 40 of 40 ordering information device number structure vrs51x550 ordering options device number flash size ram size package option voltage temperature frequency vrs51 c 550 - 40 - l 8 kb 256 bytes plcc - 44 4.5v to 5.5v - 40c to +85c 40mhz vrs51 l 550 - 25 - l 8kb 256 bytes plcc - 44 3.0v to 3.6v - 40c to +85c 25mhz vrs51 c 550 - 40 - q 8kb 256 bytes qfp - 44 4.5v to 5.5v - 40c to +85c 40 m hz vrs51 l 550 - 25 - q 8 kb 256 bytes qfp - 44 3.0v to 3.6v - 40c to +85c 25 mhz vrs51 c 550 - 40 - p 8kb 256 bytes dip - 40 4.5v to 5.5v - 40c to +85c 40mhz vrs51 l 550 - 25 - p 8kb 256 bytes dip - 40 3.0v to 3.6v - 40c to +85c 25mhz VRS51C550 - 40 - lg 8kb 256 bytes plcc - 44 4.5v to 5.5v - 40c to +85c 40mhz vrs51l550 - 25 - lg 8kb 256 bytes plcc - 44 3.0v to 3.6v - 40c to +85c 25mhz VRS51C550 - 40 - qg 8kb 256 bytes qfp - 44 4.5v to 5.5v - 40c to +85c 40mhz vrs51l550 - 25 - q g 8kb 256 bytes qfp - 44 3.0v to 3.6v - 40c to +85c 25mhz VRS51C550 - 40 - pg 8kb 25 6 bytes dip - 40 4.5v to 5.5v - 40c to +85c 40mhz vrs51l550 - 25 - pg 8kb 256 bytes dip - 40 3.0v to 3.6v - 40c to +85c 25mhz vrs51x560 ordering options device number flash size ram size package option voltage temperature frequency vrs51 c 560 - 40 - l 16 kb 256 byt es plcc - 44 4.5v to 5.5v - 40c to +85c 40mhz vrs51 c 560 - 40 - q 16kb 256 bytes qfp - 44 4.5v to 5.5v - 40c to +85c 40mhz vrs51 c 560 - 40 - p 16kb 256 bytes dip - 40 4.5v to 5.5v - 40c to +85c 40mhz vrs51c560 - 40 - lg 16kb 256 bytes plcc - 44 4.5v to 5.5v - 40c to +85c 40mhz vrs51c560 - 40 - qg 16kb 256 bytes qfp - 44 4.5v to 5.5v - 40c to +85c 40mhz vrs51c560 - 40 - p g 16kb 256 bytes dip - 40 4.5v to 5.5v - 40c to +85c 40mhz disclaimers right to make change - ramtron reserves the right to make changes to its products - inclu ding circuitry, software and services - without notice at any time. customers should obtain the most current and relevant information before placing orders. use in applications - ramtron assumes no responsibility or liability for the use of any of its pro ducts, and conveys no license or title under any patent, copyright or mask work right to these products and makes no representations or warranties that these products are free from patent, copyright or mask work right infringement unless otherwise specifie d. customers are responsible for product design and applications using ramtron parts. ramtron assumes no liability for applications assistance or customer product design. life support ? ramtron products are not designed for use in life support systems or d evices. ramtron customers using or selling ramtron products for use in such applications do so at their own risk and agree to fully indemnify ramtron for any damages resulting from such applications.


▲Up To Search▲   

 
Price & Availability of VRS51C550

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X